package Homework;
//在主函数中从键盘接收X, Y , Z3个数，
//编写函数计算这3个数的立方和并返回计算结果：S=X3+Y3+Z3
import java.util.Scanner;
public class test28 {
    public static void main(String[] args) {
        double a=getnumber();

        System.out.println(a);
    }

    public static double getnumber() {
        Scanner SC = new Scanner(System.in);
        System.out.println("请输入X的值；");
        double x = SC.nextDouble();
        System.out.println("请输入Y的值：");
        double y = SC.nextDouble();
        System.out.println("请输入Z的值：");
        double z = SC.nextDouble();
        double result= Math.pow(x, 3) + Math.pow(y, 3) + Math.pow(z, 3);
     return result;
    }

}
